<?php
class Frames_Controller_Plugin_Base extends Zend_Controller_Plugin_Abstract
{
	protected $ds = DIRECTORY_SEPARATOR;
	
	protected function appendStylesheet(Zend_View $_view, array $files)
	{
		$_headLink = $_view->headLink( );
		$baseUrl = $_view->baseUrl( );
		foreach($files as $file){
			if(false === strpos($file,'http')){
				$file = $baseUrl.$file;
			}
			$_headLink->appendStylesheet( $file );
		}
		return $this;
	}
	
	protected function appendJs( Zend_View $_view, array $files )
	{
		$_headScript = $_view->headScript( );
		$baseUrl = $_view->baseUrl( );
		foreach($files as $file){
			if(false === strpos($file,'http')){
				$file = $baseUrl.$file;
			}
			$_headScript->appendFile( $file );
		}
		return $this;
	}
}